package com.xuecheng.learning.controller;

import com.xuecheng.api.learning.LearningControllerApi;
import com.xuecheng.framework.domain.learning.response.GetUrlResult;
import com.xuecheng.learning.service.LearningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/learning")
public class LearningController implements LearningControllerApi {
    @Autowired
  private   LearningService learningService;
    /**
    * @Description: 查询课程权限，url
    * @Param:
    * @return:
    * @Author: Mr.Yuan
    * @Date:
    */
    @GetMapping("/getmedia/{courseid}/{teachpalnId}")
    @Override
    public GetUrlResult findUrl(@PathVariable("courseid") String courseid,@PathVariable("teachpalnId") String teachpalnId) {
        return learningService.findUrl(courseid,teachpalnId);
    }
}
